import "./style/reset.scss";
import "./style/style.css";
import {root, StaticViewGroup} from "adajs";
import Container from "./controls/container";
import {format} from './lib/helper';

@root()
class Root extends StaticViewGroup {
    oncreated() {
        this.context.ddm.setDefaultAssignDirective('date', (a) => {
            return a ? format(new Date(a.replace(/-/g, "/")), 'yyyy-MM-dd') : '--';
        });
        this.context.request.addRequestTransformer((ops) => ops.encodeURI = true);
        this.addChild(Container);
    }
}

export default Root;